{% extends "zato/index.html" %}

{% block html_title %}LB commands{% endblock %}

{% block "extra_css" %}
{% endblock %}

{% block "extra_js" %}
{% endblock %}

{% block "content" %}
<h2 class="zato">Clusters : <a href='{% url "cluster" %}?highlight={{ cluster.id }}'>{{ cluster.name }}</a> : Load balancer : Remote commands</h2>

<div class='page_prompt'>
    <a href="{% url "lb-manage" cluster.id %}" class="common">Config GUI view</a>
    <a href="{% url "lb-manage-source-code" cluster.id %}" class="common">Config source code view</a>

    {% if haproxy_alive.status %}
        <a href="{% url "lb-remote-command" cluster.id %}" class="common current">Remote commands</a>
        {% if cluster.stats_uri %}
            <a href="http{% if lb_use_tls %}s{% endif %}://{{ cluster.lb_host }}:{{ cluster.stats_port }}{{ cluster.stats_uri }}" class="common">Statistics</a>
        {% endif %}
    {% endif %}
</div>

<div id="markup">
    <form novalidate action="{% url "lb-remote-command" cluster.id %}" method="post">
    {% csrf_token %}
        <table id="data-table">
            <tr>
                <td style="width:30%" class='inline_header'>
                    Command: {{ form.command }}
                </td>
                <td style="width:15%" class='inline_header'>
                    Timeout: {{ form.timeout }}
                </td>
                <td style="width:20%" class='inline_header'>
                    Parameters: {{ form.extra }}
                </td>
                <td style="width:20%;text-align:left" class='inline_header'>
                    <input id="execute" type="submit" name="execute" value="Execute" />
                </td>
            </tr>

            <tr>
                <td colspan="4">
                    {{ form.result }}
                </td>
            </tr>

        </table>
    </form>
</div>



{% endblock %}
